e01baf

e01baf © Numerical Algorithms Group, 2002.

Purpose

E01BAF Interpolating functions, cubic spline interpolant, one variable

Synopsis

[lamda,c,ifail] = e01baf(x,y<,ifail>)

Description

 
 This routine determines a cubic spline s(x), defined in the range
 x <=x<=x , which interpolates (passes exactly through) the set of
  1      m                                                      
 data points (x ,y ), for i=1,2,...,m, where m>=4 and 
               i  i
 x <x <...<x . Unlike some other spline interpolation algorithms, 
  1  2      m
 derivative end conditions are not imposed. The spline interpolant 
 chosen has m-4 interior knots (lambda) ,(lambda) ,...,(lambda) , 
                                       5         6             m
 which are set to the values of x ,x ,...,x    respectively. This  
                                 3  4      m-2                             
 spline is represented in its B-spline form:
 
                               m      
                               --     
                         s(x)= >  c N (x),
                               --  i i
                               i=1    
 
 where N (x) denotes the normalised B-Spline of degree 3, defined 
        i                                                        
 upon the knots (lambda) ,(lambda)   ,...,(lambda)   , and c  
                        i         i+1             i+4       i
 denotes its coefficient, whose value is to be determined by the 
 routine.
 
 The use of B-splines requires eight additional knots (lambda) , 
                                                              1 
 (lambda) , (lambda) , (lambda) , (lambda)   , (lambda)   , 
         2          3          4          m+1          m+2 
 (lambda)    and (lambda)    to be specified; the routine sets the
         m+3             m+4                                   
 first four of these to x  and the last four to x .
                         1                       m
 Values of the spline interpolant, or of its derivatives or 
 definite integral, can subsequently be computed by calling E02BBF,
 E02BCF or E02BDF.
 

Parameters

e01baf

Required Input Arguments:

x (:)                                 real
y (:)                                 real

Optional Input Arguments:                       <Default>

ifail                                 integer  -1

Output Arguments:

lamda (:)                             real
c (:)                                 real
ifail                                 integer